<?php
ob_start();
session_start();


$wishlist= NULL;
$productId=$_GET['productId'];

if (isset($_COOKIE['mywishlist'])){
$wishlist = $_COOKIE['mywishlist'];
$wishlist = $wishlist.','.$productId;
}
else{
$wishlist = ''; 
$wishlist=$productId;
}


setcookie('mywishlist',$wishlist,time()+60*60*24*30);
$wishlist = $_COOKIE['mywishlist'];


if (isset($_COOKIE["mywishlist"]))
  {
	  echo "Continue as <br><h3>" . $_COOKIE["mywishlist"] . "</h3>";
  } 
  
  else 
  echo 'sdsd';
//echo $wishlist;
ob_end_flush();
?>
